package com.zrrd.learn.exam;


/**
 * @author wrn
 * @version 1.0
 * @date 2023/8/31 14:09
 */

public class test20230831_04 {

    /**
     * 编写一个Java程序在屏幕上输出1！+2！+3！+……+10！的和
     * @param args
     */
    public static void main(String[] args) {
        int sum =0;

        for (int i = 1; i < 11; i++) {
            int a =1;
            for (int j = 1; j < i+1; j++) {
                a = a*j;
            }
            sum = sum + a;
        }
        System.out.println(sum);
    }

}
